@extends('home/common/layout')
@section('content')

<link rel="stylesheet" href="/home/css/page-learing-personal.css" />
<link rel="stylesheet" href="/home/css/page-learing-course-score.css" />
<div class="personal-header" style="background-image: url(/home/img/asset-temp1.jpg);">
    <div class="personal-info">
        <p>
            <h1>吴雪</h1>
        </p>
        <p>Web前端工程师 学习时长 48小时35分</p>
    </div>
</div>
<!-- 页面 -->
<div class="container" style="background: #fff;">
    @include('home/common/left')
    <div class="personal-content pull-right">
        <div class="course-score-cont">
            <div class="title text-center">
                <h3>程序设计语言成绩单</h3>
            </div>
            <div class="score-info">
                <span class="more pull-right">考试成绩计算方法?</span>
            </div>
            <div>
                <table class="table text-center">
                    <tr>
                        <td>名称</td>
                        <td>分数（满分100）</td>
                        <td>操作</td>
                    </tr>
                    @foreach($info as $v)
                    <tr>
                        <td>{{$v->paper_name}}</td>
                        <td></td>
                        <td>
                            @if($v->answerpaper == null)
                            <a href="{{url('home/exam/run',['paper'=>$v->paper_id])}}"
                               target="_blank">答题
                            </a>
                                @else
                                <a href="{{url('home/exam/result',['paper'=>$v->paper_id])}}"
                                   target="_blank">查看
                                </a>
                            @endif
                        </td>
                    </tr>
                    @endforeach
                </table>
            </div>
        </div>
    </div>
</div>
<!-- 页面 css js -->
<script>
    $(function() {
        $(window).scroll(function() {
            console.log($(this)[0].scrollY);
            if ($(this)[0].scrollY > 155) {
                console.log(1);
                $('.personal-nav').css({
                    'position': 'fixed',
                    'top': 10
                });
                $('.personal-nav img').css({
                    'width': '140',
                    'height': '140'
                });
            } else if ($(this)[0].scrollY <= 155) {
                console.log(2)
                $('.personal-nav').css({
                    'position': 'relative',
                    'top': -160
                });
                $('.personal-nav img').css({
                    'width': '180',
                    'height': '180'
                });
            };
        })
    })
</script>
@endsection